""" 
    twExtJS - ToscaWidgets wrapper for ExtJS (see http://extjs.com)
    
    Distributed under the terms of Lesser GNU Public License.
    
    (c) 2007 - Ricardo Girardi Sixel 
"""

from toscawidgets.api import Widget
from toscawidgets.api import CSSLink, JSLink
from toscawidgets.widgets.extJS.util import Observable


ext_all_css = CSSLink(
    modname=__name__, filename='static/resources/css/ext-all.css')
x_theme_default_css = CSSLink(
    modname=__name__, filename='static/resources/css/xtheme-default.css')
ext_base_js = JSLink(
    modname=__name__, filename='static/adapter/ext/ext-base.js')
ext_all_js = JSLink(
    modname=__name__, filename='static/ext-all-debug.js')
ext_core_js = JSLink(
    modname=__name__, filename='static/ext-core-debug.js')

ext_lang_pt_BR_js = JSLink(
    modname=__name__, filename='static/locale/ext-lang-pt_BR.js')

BasicDialog_js = JSLink(
    modname=__name__, filename='static/legacy/BasicDialog.js')

LayoutManager_js = JSLink(
    modname=__name__, filename='static/legacy/layout/LayoutManager.js')

BorderLayout_js = JSLink(
    modname=__name__, filename='static/legacy/layout/BorderLayout.js')

LayoutRegion_js = JSLink(
    modname=__name__, filename='static/legacy/layout/LayoutRegion.js')

ContentPanels_js = JSLink(
    modname=__name__, filename='static/legacy/layout/ContentPanels.js')

BasicLayoutRegion_js = JSLink(
    modname=__name__, filename='static/legacy/layout/BasicLayoutRegion.js')

SplitLayoutRegion_js = JSLink(
    modname=__name__, filename='static/legacy/layout/SplitLayoutRegion.js')

BorderLayoutRegions_js = JSLink(
    modname=__name__, filename='static/legacy/layout/BorderLayoutRegions.js')


class Component(Observable):
    renderTo='' 
    javascript=[ext_base_js,ext_core_js,ext_all_js,BasicDialog_js]
    css=[ext_all_css,x_theme_default_css]
    componentId = None
    xtype=None
    params=Observable.params|frozenset(['xtype','componentId'])
    
class BoxComponent(Component):
    """ BoxComponent """
    
class Container(BoxComponent):
    layoutConfig = "" 
    items = []
    layout=None
    params=BoxComponent.params|frozenset(['items','layoutConfig','layout'])
   
    

